package com.lorenzogao.pley.ui.fragment

import android.annotation.SuppressLint
import com.lorenzogao.pley.ui.adapter.AppInfoAdapter
import com.lorenzogao.pley.ui.di.component.AppComponent
import com.lorenzogao.pley.ui.di.component.DaggerAppInfoComponent
import com.lorenzogao.pley.ui.di.moduel.AppInfoModule

@SuppressLint("ValidFragment")
/**
 * 作者：Lorenzo Gao
 * Date: 2018/1/8
 * Time: 11:32
 * 邮箱：2508719070@qq.com
 * Description:
 */
class CategoryAppFragment @SuppressLint("ValidFragment")
constructor(categoryId: Int, fragmentType: Int) : BaseAppInfoFragment() {


    private var mId: Int = categoryId
    private var mType: Int = fragmentType





    override fun initView() {

        mPresenter.requestCategoryApps(page,mId,mType)
        initRecyclerView()


    }

    override fun buildAdapter(): AppInfoAdapter {
        return AppInfoAdapter.builder().showPosition(false).ShowBrief(true).build()
    }

    override fun type(): Int {
        return 0
    }

    override fun setupActivityComponent(appComponent: AppComponent) {
        DaggerAppInfoComponent.builder().appComponent(appComponent).appInfoModule(AppInfoModule(this))
                .build().injectCategoryAppFragment(this)

    }


}